package me.blankm.websocket;

import androidx.appcompat.app.AppCompatActivity;
import me.blankm.wslib.WsManager;
//import me.blankm.wslib.WsManager;

import android.os.Bundle;
import android.view.View;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.Map;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        //58d1b088-545b-42d6-b6a7-9f533d405eac

        //{"mod":"Room","act":"enter","args":{"user_id":"10000038","room_id":"1920","token":"58d1b088-545b-42d6-b6a7-9f533d405eac","ck":"FWZ4QbhJe0377cCk","app_version":400,"udid":"2198f3422d05936c4822f1e067e029caa","platform":"android"}}

    }


    @Override
    protected void onDestroy() {
        super.onDestroy();
        //断开
//        WsManager.getInstance().disconnect();
    }

    public void onWsConnect(View view) {
        //连接
//        WsManager.getInstance().onConnect();

        WsUtils.getInstance().onConnect();


    }

    public void onDisConnect(View view) {
        //断开
//        WsManager.getInstance().disconnect();
    }

    public void onEnterRoom(View view) {

        WsUtils.getInstance().onEnterRoom();
    }
}